NPC HACKING FAQ
By ShInInG PhAnToM
Email: oli_lo@freenet.de
Additions by Kapow & Runelancer
08.02.2007

NPC.TBL has data for 361 entities (0000-0360). That's 169 in hex.

The data is stored in sets, one for each entity parameter, with values 1, 2, or 4 bytes in length. 
Each set has 361 entries, one for each entity, then the next set begins back at entity 0000.
So, each set is a multiple of 169h bytes, and so the starting address of each set will be a multiple of 169h.
Some NPC's are not in the NPC.TBL.

There are 11 sets:
0x0000 - 2 bytes (16 bit flags) [Special Values] [Look Down]
0x02D2 - 2 bytes (1 word) [Health Value]
0x05A4 - 1 byte [Tileset Value] [Look Down]
0x070D - 1 byte [Death Sound] [46, 47, or 48 are the most common Sounds]
0x0876 - 1 byte [Hurt Sound] [32-36 are the most common Sounds]
0x09DF - 1 byte [Death Animation] [Use 00 - 03]
0x0B48 - 4 bytes (1 dword) [Dropped Experience]
0x10EC - 4 bytes (1 dword) [Damage Value]
0x1690 - 4 bytes (seperate values) [Collsion Bounding Box]
0x1C34 - 4 bytes (seperate values) [Display Bounding Box]

The bounding boxes are 4 byte objects.

0x00 Left
0x01 Top
0x02 Right
0x03 Bottom

A sprite is always drawn using the top and left or right (depending on its direction) corner of the bounding box. This is offset from the center of the sprite, by the way: a 16x16 sprite with a bounding box of 8,8,8,8 is perfectly centered. 0,0,8,8 will offset it 8 pixels to the left/up.


Special Values:

01234567 89ABCDEF

0 - Solid				1
1 - No effect about Tile 44		2
2 - Invulnerable (Blink Sound)		4
3 - Ignore solid			8
4 - Bouncing at top			10
5 - Shootable				20
6 - Special Solid			40
7 - Rear and top attack power 0		80
8 - No Player Damage			1
9 - ???					2
A - ???					4
B - ???					8
C - ???					10
D - No Damage				20
E - ???					40
F - Show Damage Numbers			80

Tileset Value:

00 : Using the Title Tileset.
01 : Using ?????? Tileset.
02 : Using the Map Tileset.
03 : Using ?????? Tileset.
04 : Using ?????? Tileset.
05 : Using ?????? Tileset.
06 : Using Fade Tileset.
07 : Using ?????? Tileset.
08 : Using ItemImage Tileset.
09 : Using ?????? Tileset.
0A : Using ?????? Tileset.
0B : Using ?????? Tileset.
0C : Using ?????? Tileset.
0D : Using ?????? Tileset.
0E : Using ?????? Tileset.
0F : Using ?????? Tileset.
10 : Using the MyCharNPC.
11 : Using the BulletNPC.
12 : Using ?????? Tileset.
13 : Using the CaretNPC.
14 : Using the NPCSym.
15 : Using the First NPC Maps set.
16 : Using the Secound NPC Maps set.
17 : Using the NPCRegu.
